Integrand size = 28, antiderivative size = 141 \[ \int \frac {\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^2} \, dx=\frac {\left (a^2+b^2\right )^2}{a b^4 d (b+a \cot (c+d x))}-\frac {4 a \left (a^2+b^2\right ) \log (b+a \cot (c+d x))}{b^5 d}-\frac {4 a \left (a^2+b^2\right ) \log (\tan (c+d x))}{b^5 d}+\frac {\left (3 a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}-\frac {a \tan ^2(c+d x)}{b^3 d}+\frac {\tan ^3(c+d x)}{3 b^2 d} \]
(a^2+b^2)^2/a/b^4/d/(b+a*cot(d*x+c))-4*a*(a^2+b^2)*ln(b+a*cot(d*x+c))/b^5/ d-4*a*(a^2+b^2)*ln(tan(d*x+c))/b^5/d+(3*a^2+2*b^2)*tan(d*x+c)/b^4/d-a*tan( d*x+c)^2/b^3/d+1/3*tan(d*x+c)^3/b^2/d
Time = 6.02 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.99 \[ \int \frac {\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^2} \, dx=\frac {\frac {b^4 \sec ^4(c+d x)}{3 (a+b \tan (c+d x))}+\frac {4}{3} \left (-a \left (\left (a^2+b^2\right ) \log (a+b \tan (c+d x))-a b \tan (c+d x)+\frac {1}{2} b^2 \tan ^2(c+d x)\right )+\left (a^2+b^2\right ) \left (-2 a \log (a+b \tan (c+d x))+b \tan (c+d x)-\frac {a^2+b^2}{a+b \tan (c+d x)}\right )\right )}{b^5 d} \]
((b^4*Sec[c + d*x]^4)/(3*(a + b*Tan[c + d*x])) + (4*(-(a*((a^2 + b^2)*Log[ a + b*Tan[c + d*x]] - a*b*Tan[c + d*x] + (b^2*Tan[c + d*x]^2)/2)) + (a^2 + b^2)*(-2*a*Log[a + b*Tan[c + d*x]] + b*Tan[c + d*x] - (a^2 + b^2)/(a + b* Tan[c + d*x]))))/3)/(b^5*d)
Time = 0.33 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.91, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3567, 522, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cos (c+d x)^4 (a \cos (c+d x)+b \sin (c+d x))^2}dx\) |
\(\Big \downarrow \) 3567 |
\(\displaystyle -\frac {\int \frac {\left (\cot ^2(c+d x)+1\right )^2 \tan ^4(c+d x)}{(b+a \cot (c+d x))^2}d\cot (c+d x)}{d}\) |
\(\Big \downarrow \) 522 |
\(\displaystyle -\frac {\int \left (\frac {\tan ^4(c+d x)}{b^2}-\frac {2 a \tan ^3(c+d x)}{b^3}+\frac {\left (3 a^2+2 b^2\right ) \tan ^2(c+d x)}{b^4}-\frac {4 a \left (a^2+b^2\right ) \tan (c+d x)}{b^5}+\frac {4 a^2 \left (a^2+b^2\right )}{b^5 (b+a \cot (c+d x))}+\frac {\left (a^2+b^2\right )^2}{b^4 (b+a \cot (c+d x))^2}\right )d\cot (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {-\frac {4 a \left (a^2+b^2\right ) \log (\cot (c+d x))}{b^5}+\frac {4 a \left (a^2+b^2\right ) \log (a \cot (c+d x)+b)}{b^5}-\frac {\left (3 a^2+2 b^2\right ) \tan (c+d x)}{b^4}-\frac {\left (a^2+b^2\right )^2}{a b^4 (a \cot (c+d x)+b)}+\frac {a \tan ^2(c+d x)}{b^3}-\frac {\tan ^3(c+d x)}{3 b^2}}{d}\) |
-((-((a^2 + b^2)^2/(a*b^4*(b + a*Cot[c + d*x]))) - (4*a*(a^2 + b^2)*Log[Co t[c + d*x]])/b^5 + (4*a*(a^2 + b^2)*Log[b + a*Cot[c + d*x]])/b^5 - ((3*a^2 + 2*b^2)*Tan[c + d*x])/b^4 + (a*Tan[c + d*x]^2)/b^3 - Tan[c + d*x]^3/(3*b ^2))/d)
3.2.30.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. ), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*si n[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[x^m*((b + a*x)^n/(1 + x^2)^((m + n + 2)/2)), x], x, Cot[c + d*x]], x] /; FreeQ[{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] && !(GtQ[ n, 0] && GtQ[m, 1])
Time = 1.82 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.81
method | result | size |
derivativedivides | \(\frac {\frac {\frac {b^{2} \tan \left (d x +c \right )^{3}}{3}-a b \tan \left (d x +c \right )^{2}+3 \tan \left (d x +c \right ) a^{2}+2 \tan \left (d x +c \right ) b^{2}}{b^{4}}-\frac {a^{4}+2 a^{2} b^{2}+b^{4}}{b^{5} \left (a +b \tan \left (d x +c \right )\right )}-\frac {4 a \left (a^{2}+b^{2}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{5}}}{d}\) | \(114\) |
default | \(\frac {\frac {\frac {b^{2} \tan \left (d x +c \right )^{3}}{3}-a b \tan \left (d x +c \right )^{2}+3 \tan \left (d x +c \right ) a^{2}+2 \tan \left (d x +c \right ) b^{2}}{b^{4}}-\frac {a^{4}+2 a^{2} b^{2}+b^{4}}{b^{5} \left (a +b \tan \left (d x +c \right )\right )}-\frac {4 a \left (a^{2}+b^{2}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{5}}}{d}\) | \(114\) |
risch | \(-\frac {8 i \left (-2 i a \,b^{2}+3 a^{2} b +2 b^{3}-3 i a^{3}-3 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-6 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-5 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+3 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+6 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-3 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-9 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-9 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+4 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}\right )}{3 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b +i a \right ) b^{4} d}+\frac {4 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{5} d}+\frac {4 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{3} d}-\frac {4 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b^{5} d}-\frac {4 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b^{3} d}\) | \(342\) |
norman | \(\frac {-\frac {2 \left (24 a^{2}+16 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3 b^{3} d}+\frac {4 \left (2 a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{b^{3} d}+\frac {4 \left (2 a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{b^{3} d}-\frac {2 \left (36 a^{4}+44 a^{2} b^{2}+9 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 a d \,b^{4}}+\frac {2 \left (36 a^{4}+44 a^{2} b^{2}+9 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 a d \,b^{4}}+\frac {2 \left (4 a^{4}+4 a^{2} b^{2}+b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{4} d a}-\frac {2 \left (4 a^{4}+4 a^{2} b^{2}+b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{b^{4} d a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}+\frac {4 a \left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{5} d}+\frac {4 a \left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{5} d}-\frac {4 a \left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{b^{5} d}\) | \(400\) |
parallelrisch | \(\frac {-16 \left (a^{2}+b^{2}\right ) a \left (a \cos \left (2 d x +2 c \right )+\frac {3 a}{4}+\frac {b \sin \left (2 d x +2 c \right )}{2}+\frac {a \cos \left (4 d x +4 c \right )}{4}+\frac {b \sin \left (4 d x +4 c \right )}{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )+16 \left (a^{2}+b^{2}\right ) a \left (a \cos \left (2 d x +2 c \right )+\frac {3 a}{4}+\frac {b \sin \left (2 d x +2 c \right )}{2}+\frac {a \cos \left (4 d x +4 c \right )}{4}+\frac {b \sin \left (4 d x +4 c \right )}{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+16 \left (a^{2}+b^{2}\right ) a \left (a \cos \left (2 d x +2 c \right )+\frac {3 a}{4}+\frac {b \sin \left (2 d x +2 c \right )}{2}+\frac {a \cos \left (4 d x +4 c \right )}{4}+\frac {b \sin \left (4 d x +4 c \right )}{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\frac {16 \left (-3 a^{4}-3 a^{2} b^{2}-b^{4}\right ) \cos \left (2 d x +2 c \right )}{3}+\frac {2 \left (-6 a^{4}-9 a^{2} b^{2}-4 b^{4}\right ) \cos \left (4 d x +4 c \right )}{3}-\frac {4 a \,b^{3} \sin \left (2 d x +2 c \right )}{3}+\frac {2 a \,b^{3} \sin \left (4 d x +4 c \right )}{3}-12 a^{4}-10 a^{2} b^{2}}{b^{5} d \left (2 b \sin \left (2 d x +2 c \right )+a \cos \left (4 d x +4 c \right )+4 a \cos \left (2 d x +2 c \right )+b \sin \left (4 d x +4 c \right )+3 a \right )}\) | \(400\) |
1/d*(1/b^4*(1/3*b^2*tan(d*x+c)^3-a*b*tan(d*x+c)^2+3*tan(d*x+c)*a^2+2*tan(d *x+c)*b^2)-1/b^5*(a^4+2*a^2*b^2+b^4)/(a+b*tan(d*x+c))-4*a/b^5*(a^2+b^2)*ln (a+b*tan(d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 281 vs. \(2 (139) = 278\).
Time = 0.29 (sec) , antiderivative size = 281, normalized size of antiderivative = 1.99 \[ \int \frac {\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^2} \, dx=-\frac {4 \, {\left (3 \, a^{2} b^{2} + 2 \, b^{4}\right )} \cos \left (d x + c\right )^{4} - b^{4} - 2 \, {\left (3 \, a^{2} b^{2} + 2 \, b^{4}\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left ({\left (a^{4} + a^{2} b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{3} \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \, {\left ({\left (a^{4} + a^{2} b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{3} \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) + 2 \, {\left (a b^{3} \cos \left (d x + c\right ) - 2 \, {\left (3 \, a^{3} b + 2 \, a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{3 \, {\left (a b^{5} d \cos \left (d x + c\right )^{4} + b^{6} d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right )\right )}} \]
-1/3*(4*(3*a^2*b^2 + 2*b^4)*cos(d*x + c)^4 - b^4 - 2*(3*a^2*b^2 + 2*b^4)*c os(d*x + c)^2 + 6*((a^4 + a^2*b^2)*cos(d*x + c)^4 + (a^3*b + a*b^3)*cos(d* x + c)^3*sin(d*x + c))*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*c os(d*x + c)^2 + b^2) - 6*((a^4 + a^2*b^2)*cos(d*x + c)^4 + (a^3*b + a*b^3) *cos(d*x + c)^3*sin(d*x + c))*log(cos(d*x + c)^2) + 2*(a*b^3*cos(d*x + c) - 2*(3*a^3*b + 2*a*b^3)*cos(d*x + c)^3)*sin(d*x + c))/(a*b^5*d*cos(d*x + c )^4 + b^6*d*cos(d*x + c)^3*sin(d*x + c))
\[ \int \frac {\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^2} \, dx=\int \frac {\sec ^{4}{\left (c + d x \right )}}{\left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right )^{2}}\, dx \]
Time = 0.22 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.82 \[ \int \frac {\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^2} \, dx=-\frac {\frac {3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}}{b^{6} \tan \left (d x + c\right ) + a b^{5}} - \frac {b^{2} \tan \left (d x + c\right )^{3} - 3 \, a b \tan \left (d x + c\right )^{2} + 3 \, {\left (3 \, a^{2} + 2 \, b^{2}\right )} \tan \left (d x + c\right )}{b^{4}} + \frac {12 \, {\left (a^{3} + a b^{2}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{5}}}{3 \, d} \]
-1/3*(3*(a^4 + 2*a^2*b^2 + b^4)/(b^6*tan(d*x + c) + a*b^5) - (b^2*tan(d*x + c)^3 - 3*a*b*tan(d*x + c)^2 + 3*(3*a^2 + 2*b^2)*tan(d*x + c))/b^4 + 12*( a^3 + a*b^2)*log(b*tan(d*x + c) + a)/b^5)/d
Time = 0.32 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.06 \[ \int \frac {\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^2} \, dx=-\frac {\frac {12 \, {\left (a^{3} + a b^{2}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{5}} - \frac {b^{4} \tan \left (d x + c\right )^{3} - 3 \, a b^{3} \tan \left (d x + c\right )^{2} + 9 \, a^{2} b^{2} \tan \left (d x + c\right ) + 6 \, b^{4} \tan \left (d x + c\right )}{b^{6}} - \frac {3 \, {\left (4 \, a^{3} b \tan \left (d x + c\right ) + 4 \, a b^{3} \tan \left (d x + c\right ) + 3 \, a^{4} + 2 \, a^{2} b^{2} - b^{4}\right )}}{{\left (b \tan \left (d x + c\right ) + a\right )} b^{5}}}{3 \, d} \]
-1/3*(12*(a^3 + a*b^2)*log(abs(b*tan(d*x + c) + a))/b^5 - (b^4*tan(d*x + c )^3 - 3*a*b^3*tan(d*x + c)^2 + 9*a^2*b^2*tan(d*x + c) + 6*b^4*tan(d*x + c) )/b^6 - 3*(4*a^3*b*tan(d*x + c) + 4*a*b^3*tan(d*x + c) + 3*a^4 + 2*a^2*b^2 - b^4)/((b*tan(d*x + c) + a)*b^5))/d
Time = 26.12 (sec) , antiderivative size = 1132, normalized size of antiderivative = 8.03 \[ \int \frac {\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^2} \, dx=\text {Too large to display} \]
((8*tan(c/2 + (d*x)/2)^2*(a^2 + b^2))/b^3 + (8*tan(c/2 + (d*x)/2)^6*(a^2 + b^2))/b^3 - (16*tan(c/2 + (d*x)/2)^4*(3*a^2 + 2*b^2))/(3*b^3) - (2*tan(c/ 2 + (d*x)/2)^7*(4*a^4 + b^4 + 4*a^2*b^2))/(a*b^4) - (2*tan(c/2 + (d*x)/2)^ 3*(36*a^4 + 9*b^4 + 44*a^2*b^2))/(3*a*b^4) + (2*tan(c/2 + (d*x)/2)^5*(36*a ^4 + 9*b^4 + 44*a^2*b^2))/(3*a*b^4) + (2*tan(c/2 + (d*x)/2)*(4*a^4 + b^4 + 4*a^2*b^2))/(a*b^4))/(d*(a + 2*b*tan(c/2 + (d*x)/2) - 4*a*tan(c/2 + (d*x) /2)^2 + 6*a*tan(c/2 + (d*x)/2)^4 - 4*a*tan(c/2 + (d*x)/2)^6 + a*tan(c/2 + (d*x)/2)^8 - 6*b*tan(c/2 + (d*x)/2)^3 + 6*b*tan(c/2 + (d*x)/2)^5 - 2*b*tan (c/2 + (d*x)/2)^7)) + (a*atan(((a*(a^2 + b^2)*((16*tan(c/2 + (d*x)/2)*(4*a ^5 + 4*a^3*b^2))/b^4 - (4*(8*a^2*b^7 + 8*a^4*b^5))/b^8 + (4*tan(c/2 + (d*x )/2)^2*(8*a^2*b^7 + 8*a^4*b^5))/b^8 + (4*a*(a^2 + b^2)*((4*(a*b^10 + 4*a^3 *b^8))/b^8 - (4*tan(c/2 + (d*x)/2)^2*(3*a*b^10 + 4*a^3*b^8))/b^8 + 16*a^2* b*tan(c/2 + (d*x)/2)))/b^5)*4i)/b^5 - (a*(a^2 + b^2)*((4*(8*a^2*b^7 + 8*a^ 4*b^5))/b^8 - (16*tan(c/2 + (d*x)/2)*(4*a^5 + 4*a^3*b^2))/b^4 - (4*tan(c/2 + (d*x)/2)^2*(8*a^2*b^7 + 8*a^4*b^5))/b^8 + (4*a*(a^2 + b^2)*((4*(a*b^10 + 4*a^3*b^8))/b^8 - (4*tan(c/2 + (d*x)/2)^2*(3*a*b^10 + 4*a^3*b^8))/b^8 + 16*a^2*b*tan(c/2 + (d*x)/2)))/b^5)*4i)/b^5)/((8*(16*a^7 + 16*a^3*b^4 + 32* a^5*b^2))/b^8 + (8*tan(c/2 + (d*x)/2)^2*(16*a^7 + 16*a^3*b^4 + 32*a^5*b^2) )/b^8 + (4*a*(a^2 + b^2)*((16*tan(c/2 + (d*x)/2)*(4*a^5 + 4*a^3*b^2))/b^4 - (4*(8*a^2*b^7 + 8*a^4*b^5))/b^8 + (4*tan(c/2 + (d*x)/2)^2*(8*a^2*b^7 ...